package lt.marsrutai.mobile.android.activity;

import lt.marsrutai.mobile.android.R;
import lt.marsrutai.mobile.android.fragment.NextArrivalTimesFragment;
import android.support.v4.app.ListFragment;

import com.actionbarsherlock.app.ActionBar;

public class NearestRoutesActivity extends BaseActivity {

    @Override
    protected void setupActionBar(final ActionBar actionBar) {
        super.setupActionBar(actionBar);

        actionBar.setDisplayShowTitleEnabled(true);
        actionBar.setTitle(getString(R.string.nearest_routes));
    }

    @Override
    protected int getNavigationMode() {
        return ActionBar.NAVIGATION_MODE_STANDARD;
    }

    @Override
    public void setupView() {
        if (getSupportFragmentManager().findFragmentById(android.R.id.content) == null) {
            ListFragment fragment = new NextArrivalTimesFragment();
            fragment.setArguments(getIntent().getExtras());
            getSupportFragmentManager().beginTransaction().add(android.R.id.content, fragment).commit();
        }
    }

}
